/*  1:   */ package nl.siegmann.epublib.util;
/*  2:   */ 
/*  3:   */ import java.awt.Desktop;
/*  4:   */ import java.net.URL;
/*  5:   */ 
/*  6:   */ public class DesktopUtil
/*  7:   */ {
/*  8:   */   public static boolean launchBrowser(URL url)
/*  9:   */     throws DesktopUtil.BrowserLaunchException
/* 10:   */   {
/* 11:20 */     if (Desktop.isDesktopSupported()) {
/* 12:   */       try
/* 13:   */       {
/* 14:22 */         Desktop.getDesktop().browse(url.toURI());
/* 15:23 */         return true;
/* 16:   */       }
/* 17:   */       catch (Exception ex)
/* 18:   */       {
/* 19:25 */         throw new BrowserLaunchException("Browser could not be launched for " + url, ex, null);
/* 20:   */       }
/* 21:   */     }
/* 22:28 */     return false;
/* 23:   */   }
/* 24:   */   
/* 25:   */   public static class BrowserLaunchException
/* 26:   */     extends Exception
/* 27:   */   {
/* 28:   */     private BrowserLaunchException(String message, Throwable cause)
/* 29:   */     {
/* 30:34 */       super(cause);
/* 31:   */     }
/* 32:   */   }
/* 33:   */ }


/* Location:           C:\Users\David\workspace\CosaRaraPorqueSi\main\epublib-tools-3.1.jar
 * Qualified Name:     nl.siegmann.epublib.util.DesktopUtil
 * JD-Core Version:    0.7.0.1
 */